package com.sali.a_pre_knowledge.lesson_lsp.lession_02;

import lombok.extern.slf4j.Slf4j;

import java.math.BigDecimal;

/**
 * @description:
 * @date: 2022/11/5 11:42.
 * @version: 1.0
 */
@Slf4j
public class CashCard extends AbstractBankCard {

    public CashCard(String cardNo, String cardDate) {
        super(cardNo, cardDate);
    }

    @Override
    public boolean rule(BigDecimal amount) {
        return true;
    }

    /**
     * description: 提现
     **/
    @Override
    public String handleGet(String orderId, BigDecimal amount) {
        log.info("提现成功，单号是：{},金额是：{}", orderId, amount);
        return "123456";
    }

    /**
     * description: 储蓄
     **/
    @Override
    public String handlePut(String orderId, BigDecimal amount) {
        log.info("储蓄成功，单号是：{},金额是：{}", orderId, amount);
        return "123456";
    }

}
